<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="_fragments :: head(~{::title})">
    <title>Kuang_lib's Blog</title>
</head>
<body>

<!--导航-->
<nav id="nav" class="gird-header" style="display: none">
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui olive header item" style="font-family: STSong">Kuang_lib</h2>
            <!--<div class="right m-item item m-mobile-hide">-->
            <a href="#" th:href="@{/}" class="active m-item item"><i class="home icon"></i>首页</a>
            <a href="#" th:href="@{/types/-1}" class="m-item item"><i class="clone outline icon"></i>分类</a>
            <a href="#" th:href="@{/archives}" class="m-item item"><i class="clock icon"></i>时间轴</a>
            <a href="#" th:href="@{/message}" class="m-item item"><i class="book icon"></i>留言板</a>
            <a href="#" th:href="@{/friends}" class="m-item item"><i class="pencil alternate icon"></i>友人帐</a>
            <a href="#" th:href="@{/picture}" class="olive m-item item"><i class="image icon"></i>照片墙</a>
            <a href="#" th:href="@{/about}" class="m-item item"><i class="info icon"></i>关于我</a>
            <!--</div>-->
            <div class="right m-item item">
                <form name="search" action="#" th:action="@{/search}" method="post" target="_blank">
                    <div class="ui icon Inverted input m-margin-tb-tiny" >
                        <input style="color: #0a001f" type="text" name="query" placeholder="Search...."
                               th:value="${query}">
                        <i onclick="document.forms['search'].submit()" class="search link icon"></i>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-hide" style="display: none">
        <i class="sidebar icon"></i>
    </a>
</nav>


<!--顶部图片-->
<div class="m-bg-class_outer" style="width: 100%;height: 750px">
    <img th:src="@{/images/bg.jpg}" alt="" class="ui m-bg image" style="width: 100%;height: 100%">
    <div class="m-bg-class_cover" align="center">
        <div class="m-margin-top-maxx" align="center">
            <img class="ui circular image" align="center" th:src="@{/images/me2.jpg}"
                 style="width: 150px;height: 150px;">
        </div>
        <div class="m-font-size-title-mediul" align="center">Kuang_lib</div>

        <div class="" align="center">
            <a href="#" class="ui wechat circular icon button"><i class="weixin icon"></i></a>
            <a href="#" class="ui qq circular icon button" data-content="1638907037" data-position="bottom center"><i
                    class="qq icon"></i></a>
            <a href="https://github.com/Kuang-lib" target="_blank" class="ui github circular icon button"
               data-content="点击跳转GitHub" data-position="bottom center"><i class="github icon"></i></a>
            <a href="https://kuangyuanbin.cn/" target="_blank" class="ui csdn circular icon button"
               data-content="点击跳转CSDN" data-position="bottom center"><i class="copyright outline icon"></i></a>
            <a href="#" class="ui email circular icon button" data-content="1638907037@qq.com"
               data-position="bottom center"><i class="envelope  icon"></i></a>
        </div>

        <div class="ui wechat-qr flowing popup transition hidden">
            <img th:src="@{/images/wechat.jpg}" alt=""
                 class="ui rounded image" style="width: 110px">
            <div align="center">微信</div>
        </div>

        <div class="ui qq-qr flowing popup transition hidden">
            <img th:src="@{/images/qq.jpg}" alt="" class="ui rounded image"
                 style="width: 110px">
            <div align="center">QQ</div>
        </div>

        <div class="m-font-size-text" align="center">愿历经千帆，归来仍少年</div>
        <hr style="width: 40%">
        <h5 class="m-font-size-text-init-title m-margin-top-large">“大圣，此去欲何?”</h5>
        <h5 class="m-font-size-text-init-title">“踏南天，碎凌霄”</h5>
        <h5 class="m-font-size-text-init-title">“若一去不回……”</h5>
        <h5 class="m-font-size-text-init-title">“便一去不回”</h5>
        <div id="waypoint" class="ui m-margin-top-large" align="center">
            <a href="#" th:href="@{/}"
               class="ui circular icon button m-opacity-small m-item item m-mobile-hide m-index-btn"
               th:classappend="${n==0} ? 'active'"><i class="home icon"></i>首页</a>
            <a href="#" th:href="@{/types/-1}"
               class="ui circular icon button m-opacity-small m-item item m-mobile-hide m-index-btn"
               th:classappend="${n==1} ? 'active'"><i class="clone outline icon"></i>分类</a>
            <a href="#" th:href="@{/archives}" class="ui circular icon button m-opacity-small m-item item m-mobile-hide"
               th:classappend="${n==2} ? 'active'"><i class="clock icon"></i>时间轴</a>
            <a href="#" th:href="@{/message}" class="ui circular icon button m-opacity-small m-item item m-mobile-hide"
               th:classappend="${n==4} ? 'active'"><i class="book icon"></i>留言板</a>
            <a href="#" th:href="@{/friends}" class="ui circular icon button m-opacity-small m-item item m-mobile-hide"
               th:classappend="${n==5} ? 'active'"><i class="pencil alternate icon"></i>友人帐</a>
            <a href="#" th:href="@{/picture}" class="ui circular icon button m-opacity-small m-item item m-mobile-hide"
               th:classappend="${n==6} ? 'active'"><i class="image icon"></i>照片墙</a>
            <a href="#" th:href="@{/about}" class="ui circular icon button m-opacity-small m-item item m-mobile-hide"
               th:classappend="${n==7} ? 'active'"><i class="info icon"></i>关于我</a>
        </div>
        <div class="hiddenDiv"></div>
    </div>

</div>

<div class="m-container m-padded-tb-big animated fadeIn">
    <div class="ui container">
        <div class="ui stackable grid">
            <!--左边博客列表-->
            <div class="eleven wide column">
                <div class="ui vertical segment">
                    <div class="ui m-container-small m-opacity-large">
                        <div class="ui secondary segment " align="center">
                            <i class="bookmark icon"></i>文章列表
                        </div>
                    </div>
                    <!--博文列表-->
                    <div class="ui padded segment m-padded-tb-large m-opacity-large" th:each="blog : ${pageInfo.list}">
                        <div class="ui large aligned mobile reversed stackable grid">
                            <!--博文信息-->
                            <div class="eleven wide column ">
                                <h3 class="ui header"><a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank"
                                                         class="m-black m-title-font" th:text="${blog.title}">大圣，此去欲何?</a>
                                </h3>
                                <p class="m-text m-margin-top-max" th:text="|${blog.description}......|">
                                    戴上金箍，没法爱你；放下金箍，没法保护你。我知道上天不会给我第二次机会，曾经我们说好的永远，原来也仅仅只有，十二画，而已。“大圣，此去欲何?”“踏南天，碎凌霄。”“若一去不回……”“便一去不回”
                                    其实很多时候，我们都是有机会的，最后真正放弃的，是我们自己。......</p>
                                <div class="ui m-margin-top-max grid">
                                    <div class="eleven wide column">
                                        <div class="ui mini horizontal link list">
                                            <div class="item">
                                                <img th:src="@{${blog.avatar}}" alt=""
                                                     class="ui avatar image">
                                                <div class="content"><a href="#" th:href="@{/about}" target="_blank"
                                                                        class="header"
                                                                        th:text="${blog.nickname}">oneStar</a></div>
                                            </div>
                                            <div class="item">
                                                <i class="calendar icon"></i><span
                                                    th:text="${#dates.format(blog.updateTime,'yyyy-MM-dd')}">2020-01-01</span>
                                            </div>
                                            <div class="item">
                                                <i class="eye icon"></i> <span th:text="${blog.views}">2222</span>
                                            </div>
                                            <div class="item">
                                                <i class="comment outline icon"></i> <span th:text="${blog.commentCount}">2222</span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="right aligned five wide column">
                                        <a href="#" target="_blank" class="ui teal basic label m-padded-tiny m-text-thin"
                                           th:text="${blog.typeName}">好文</a>
                                    </div>
                                </div>
                            </div>
                            <!--博文图片-->
                            <div class="five wide column">
                                <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank">
                                    <img th:src="@{${blog.firstPicture}}" alt=""
                                         class="ui rounded image">
                                </a>
                            </div>

                        </div>
                    </div>
                    <!--</div>-->
                    <!--分页-->
                    <div class="ui bottom attached segment m-opacity stackable grid">
                        <div class="three wide column" align="center">
                            <a class="item" th:href="@{/(pageNum=${pageInfo.hasPreviousPage}?${pageInfo.prePage}:1)}"
                               th:unless="${pageInfo.isFirstPage}">上一页</a>
                        </div>

                        <div class="ten wide column" align="center">
                            <p><span th:text="${pageInfo.pageNum}"></span> / <span th:text="${pageInfo.pages}"></span></p>
                        </div>

                        <div class="three wide column" align="center">
                            <a class="item"
                               th:href="@{/(pageNum=${pageInfo.hasNextPage}?${pageInfo.nextPage}:${pageInfo.pages})}"
                               th:unless="${pageInfo.isLastPage}">下一页</a>
                        </div>
                    </div>

                </div>

            </div>

            <!--右边的top-->
            <div class="five wide column m-opacity-large">

                <!--分类-->
                <div class="ui segments">
                    <div class="ui secondary segment">
                        <div class="ui two column grid">
                            <div class="column">
                                <i class="idea icon"></i>分类
                            </div>
                            <div class="right aligned column">
                                <a href="#" th:href="@{/types/-1}" target="_blank">more <i class="angle double right icon"></i></a>
                            </div>
                        </div>
                    </div>
                    <div class="ui teal segment">
                        <div class="ui fluid vertical menu" th:each="type : ${types}">
                            <a th:href="@{/types/{id}(id=${type.id})}" target="_blank" class="item">
                                <span th:text="${type.name}">学习日志</span>
                                <div class="ui teal basic left pointing label" th:text="${#arrays.length(type.blogs)}">13</div>
                            </a>
                        </div>
                    </div>
                </div>

                <!--最新推荐-->
                <div class="ui segments m-margin-top-large">
                    <div class="ui secondary segment ">
                        <i class="bookmark icon"></i>最新推荐
                    </div>
                    <div class="ui segment" th:each="reblog : ${recommendedBlogs}">
                        <a th:href="@{/blog/{id}(id=${reblog.id})}" target="_blank" class="m-black m-text-thin" th:text="${reblog.title}">用户故事（User Story）</a>
                    </div>

                </div>

            </div>

        </div>
    </div>

</div>


<!--置顶图标-->
<div id="toolbar" class="m-padded-tb-large m-fixed m-right-bottom" style="display: none">
    <a href="#" class="ui teal icon button"><i class="chevron up icon"></i> </a>
</div>


<br>
<br>
<br>
<!--底部栏-->
<footer class="ui inverted vertical segment m-padded-tb-massive m-opacity">
    <!--容器-->
    <div class="ui center aligned container">
        <div class="ui inverted divided stackable grid">
            <div class="four wide column">
                <div style="font-size: large;font-weight: bold"
                     class="ui inverted m-text-thin m-text-spaced m-margin-top-max">联系我
                </div>
                <div class="ui inverted link list">
                    <a href="#" class="item m-text-thin">Email：1638907037@qq.com</a>
                    <a href="#" class="item m-text-thin">QQ：1638907037</a>
                </div>
            </div>

            <div class="eight wide column">
                <div style="font-size: large;font-weight: bold"
                     class="ui inverted m-text-thin m-text-spaced m-margin-top-max">Kuang's Home
                </div>
                <div class="ui inverted link list">
                    <p class="m-text-thin m-text-spaced m-opacity-mini">这是我的个人博客，主要是用于记录所学，总结知识，或是记录一些所见所闻所感。
                        不过，最最最重要的目的，还是想记录下自己的成长，给以后留下一些自己曾努力过的回忆，
                        也希望自己一如自己一直喜欢的那句话所说:”愿历经千帆，归来仍少年“，
                        所以也希望自己能够长期维护好它...
                    </p>
                </div>
            </div>

            <!--博客运行时间统计-->
            <div class="four wide column">
                <div style="font-size: large;font-weight: bold" class="ui inverted  m-text-thin m-text-spaced m-margin-top">本站信息</div>
                <!--<p id="htmer_time" class="item m-text-thin"></p>-->
                <div id="blog-message">
                    <div class="ui inverted link list" style="align-content: center;margin-top: 10px" th:fragment="blogMessage">
                        <div class="m-text-thin" style="text-align: left;margin-left: 75px;">
                            文章总数： <h2 class="ui orange header m-inline-block m-margin-top-null" style="font-size:medium;" th:text="${blogTotal}"> 14 </h2> 篇
                        </div>
                        <div class="m-text-thin" style="text-align: left;margin-left: 75px">
                            访问总数： <h2 class="ui orange header m-inline-block m-margin-top-null" style="font-size:medium;" th:text="${blogViewTotal}"> 14 </h2> 次
                        </div>
                        <div class="m-text-thin" style="text-align: left;margin-left: 75px">
                            评论总数： <h2 class="ui orange header m-inline-block m-margin-top-null" style="font-size:medium;" th:text="${blogCommentTotal}"> 14 </h2> 条
                        </div>
                        <div class="m-text-thin" style="text-align: left;margin-left: 75px">
                            留言总数： <h2 class="ui orange header m-inline-block m-margin-top-null" style="font-size:medium;" th:text="${blogMessageTotal}"> 14 </h2> 条
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="ui inverted section divider"></div>
        <div style="color: #F08047;margin-top: -18px" class="ui inverted m-text-thin m-text-spaced">本站已运行：<span
                id="htmer_time" class="item m-text-thin"></span> (*๓´╰╯`๓)
        </div>
        <p class="m-text-thin m-text-spaced m-opacity-tiny">Copyright ©2020 kuang_lib Designed by Kuang</p>
        <a rel="nofollow" href="http://www.beian.miit.gov.cn" target="_blank">赣ICP备20008893号</a>
    </div>

</footer>


<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
<script src="../static/lib/waypoints/jquery.waypoints.min.js"
        th:src="@{/lib/waypoints/jquery.waypoints.min.js}"></script>

<script th:replace="_fragments :: scriptTimer"></script>
<script>


    var waypoint = new Waypoint({
        element: document.getElementById('waypoint'),
        handler: function (direction) {
            if (direction == 'down') {
                $('#toolbar').show(100);
            } else {
                $('#toolbar').hide(500);
            }
            console.log('Scrolled to waypoint!  ' + direction);
        }
    })

    // 显示微信
    $('.wechat').popup({
        popup: $('.wechat-qr'),
        position: 'bottom center'
    });

    // 显示QQ
    $('.qq').popup({
        popup: $('.qq-qr'),
        position: 'bottom center'
    });

    // 显示邮箱
    $('.email').popup();

    // 显示CSDN
    $('.csdn').popup();

    // 显示github
    $('.github').popup();

    // 导航栏显示
    var waypoint = new Waypoint({
        element: document.getElementById('waypoint'),
        handler: function (direction) {
            if (direction == 'down') {
                $('#nav').show(500);
            } else {
                $('#nav').hide(500);
            }
            console.log('Scrolled to waypoint!  ' + direction);
        }
    })
</script>
</body>
</html>